<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>

<html>
<head>
<sj:head jqueryui="true" jquerytheme="redmond"></sj:head>
<script type="text/javascript">
	function okButton() {
		alert('OK Button pressed!');
	};

	function cancelButton() {
		alert('Cancel Button pressed!');
		$('#mybuttondialog').dialog('close');
	};
	$.subscribe('tabchange', function(event, data) {

		var tab = event.originalEvent.ui.index;
		if (tab == 1) {
			$('#remotetabs').tabs('enable', 2);
		} else if (tab == 2) {
			$('#remotetabs').tabs('disable', 2);
			$('#remotetabs').tabs('enable', 3);
			$('#remotetabs').tabs('enable', 4);
			$('#remotetabs').tabs('enable', 5);
		}

	});
	$.subscribe('tabcomplete', function(event, ui) {
		$('#infopanel').html(
				'<strong>Completed request with Status '
						+ event.originalEvent.status
						+ '.</strong><br/>Status: '
						+ event.originalEvent.request.status);
	});

	function onClickSave() {
		window.location = "premiseSaveAction.action";
	};
	function onClickBack() {
		window.location = "premiseBackAction.action";
	};
</script>
</head>
<body>
	<fieldset>
		<Legend>Organisation Detail</Legend>



		<sj:tabbedpanel id="remotetabs" spinner="Please wait ..."
			disabledTabs="[2,3,4,5]" onCompleteTopics="tabcomplete"
			onChangeTopics="tabchange">
			<sj:tab id="tab1" target="tone" label="Detail 1" />
			<sj:tab id="tab2" target="ttwo" label="Detail 2" />
			<sj:tab id="tab3" target="tthree" label="Detail 3" />
			<sj:tab id="tab4" target="tfour" label="Detail 4" />
			<sj:tab id="tab5" target="tfive" label="Facility" />
			<%--  <sj:tab id="tab6"  target="tsix" label="Volunteering"/> --%>
			<sj:tab id="tab7" target="tseven" label="Minor Work " />
			<sj:tab id="tab8" target="teight" label="Services" />

			<div id="tone">
				<fieldset>
					<table width="100%">
						<tr>
							<td align="right"><sj:submit formIds="formSelectOne"
									targets="result" effect="pulsate" value="Save"
									indicator="indicator" button="true" /> <sj:a button="true"
									onclick="onButtonClick()">Back</sj:a></td>

						</tr>
					</table>
					
					
		<% String numPremise= (String) request.getParameter("premiseId");
			int premiseId=-1;	
		if(numPremise!=""){
			premiseId=Integer.parseInt(numPremise);
			}
		%>		
					
					<s:form id="formSelectOne" action="addPremiseAction" theme="simple">
						<table>
							<tr>
							<s:hidden id="premiseId" name="premiseId"/>
								<td>Organisation Name <font color="red">*</font></td>
								<td><s:textfield id="locationName" name="locationName"></s:textfield>
								</td>
								<td>Preferred Organisation</td>
								<td><s:checkbox name="isNewShop" id="isNewShop"></s:checkbox>
								</td>
							</tr>

							<tr>
								<td>Organisation Short Description</td>
								<td><s:textarea name="shortDescription"></s:textarea>
								</td>
								<td>Expression Of Interest<br> Type of bussiness <font
									color="red">*</font></td>
								<td><s:checkbox name="expressionOfInterest"></s:checkbox><br>
									<s:textfield name="serviceName"></s:textfield> <A HREF="lookup"><font
										color="blue">Lookup</font> </A></td>
							</tr>

							<tr>
								<td>Lead Contact</td>
								<td><s:textfield name="locationDescription"
										id="locationDescription"></s:textfield> <A HREF="lookup"><font
										color="blue">Lookup</font> </A></td>
								<td>SIC Code</td>
								<td><s:textfield name="sicCode"></s:textfield>
								</td>
							</tr>

							<tr>
								<td>Address Line 1<font color="red">*</font><br>
									Address Line 2</td>
								<td><s:textfield name="address1" id="address1"></s:textfield>
									<br> <s:textfield name="addressLine2"></s:textfield></td>
								<td>Organisation Full Description</td>
								<td><s:textarea name="organisationFullDescription"></s:textarea>
								</td>
							</tr>
							<tr>
								<td>Address Line 3</td>
								<td><s:textfield name="addressLine3"></s:textfield></td>
								<td>Phone Number <font color="red">*</font></td>
								<td><s:textfield name="phoneNumber"></s:textfield>
								</td>
							</tr>
							<tr>
								<td>Post Code</td>
								<td><s:textfield name="postCode"></s:textfield> <A
									HREF="lookup"><font color="blue">Lookup</font> </A></td>
								<td>Fax</td>
								<td><s:textfield name="fax"></s:textfield>
								</td>
							</tr>
							<tr>
								<td>City Town</td>
								<td><s:textfield name="cityTown"></s:textfield>
								</td>
								<td>Email</td>
								<td><s:textfield name="email"></s:textfield></td>
							</tr>
							<tr>
								<td>Country</td>
								<td><s:textfield name="country"></s:textfield>
								</td>
								<td>Web Address</td>
								<td><s:textfield name="webAddress"></s:textfield>
								</td>
							</tr>
							<tr>
								<td>Nation/Country</td>
								<td><s:select
										list="#{'01':'Czech','02':'French','03':'Viet Nam','04':'America'}"
										name="nation"></s:select></td>
								<td>Charity Number <br> Company Number</td>
								<td><s:textfield name="charityNumber"></s:textfield><br>
									<br> <s:textfield name="companyNumber"></s:textfield>
								</td>
							</tr>

						</table>
					</s:form>
				</fieldset>
			</div>


			<div id="ttwo">
				<fieldset>
					<table width="100%">
						<tr>
							<td align="right"><sj:submit formIds="formSelectOne"
									targets="result" effect="pulsate" value="Save"
									indicator="indicator" button="true" /> <sj:a button="true"
									onclick="onButtonClick()">Back</sj:a></td>

						</tr>
					</table>
					<s:form theme="simple">
						<table>
							<tr>
								<td>Service Benefits Critetion</td>
								<td>
									<fieldset>

										<INPUT NAME="options" TYPE="CHECKBOX" VALUE="01">Option
										1<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="02">Option
										2<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="03">
										Option 3<BR> <INPUT NAME="options" TYPE="CHECKBOX"
											VALUE="04"> Option 4<BR> <INPUT NAME="options"
											TYPE="CHECKBOX" VALUE="05"> Option 5<BR>

									</fieldset>
								</td>
								<td>Media Contact</td>
								<td>
									<fieldset>
										<INPUT NAME="options" TYPE="CHECKBOX" VALUE="01">Option
										1<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="02">Option
										2<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="03">
										Option 3<BR>

									</fieldset>
								</td>
							</tr>

							<tr>
								<td>Media Contact</td>
								<td><s:checkbox name="mediacontact"></s:checkbox>
								<td>Cartering Facilities</td>
								<td><s:checkbox name="carteringfacilities"></s:checkbox>
							</tr>

							<tr>
								<td>Media Contact Name</td>
								<td><s:textfield name="postCode"></s:textfield> <A
									HREF="lookup"><font color="blue">Lookup</font> </A></td>

								<td>Media Contact Name</td>
								<td><s:textfield name="postCode"></s:textfield> <A
									HREF="lookup"><font color="blue">Lookup</font> </A></td>

							</tr>

							<tr>
								<td>Local Demogharp</td>
								<td>
									<fieldset>
										<INPUT NAME="options" TYPE="CHECKBOX" VALUE="01">Option
										1<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="02">Option
										2<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="03">
										Option 3<BR>

									</fieldset>
								</td>
								<td>Nation/Country</td>
								<td><s:select
										list="#{'01':'Czech','02':'French','03':'Viet Nam','04':'America'}"
										name="nation"></s:select></td>
								<td>
							<tr>

								<td></td>
								<td></td>
								<td>Nation/Country</td>
								<td><s:select
										list="#{'01':'Czech','02':'French','03':'Viet Nam','04':'America'}"
										name="nation"></s:select></td>
							</tr>

							<tr>

								<td></td>
								<td></td>
								<td>Nation/Country</td>
								<td><s:checkbox name="nation"></s:checkbox></td>
							</tr>
							<tr>

								<td></td>
								<td></td>
								<td>Nation/Country</td>
								<td><s:textarea name="nation1"></s:textarea></td>
							</tr>
							<tr>
								<td>Local nomao</td>
								<td><s:textarea name="localnomo"></s:textarea>
								<td>Media Contact</td>
								<td><s:checkbox name="mediacontact"></s:checkbox></td>
							</tr>


							<tr>

								<td></td>
								<td></td>

								<td>Volunteering Opportunities</td>
								<td><s:checkbox name="volunteering"></s:checkbox></td>

							</tr>

						</table>
					</s:form>
				</fieldset>
			</div>


			<div id="tthree">
				<fieldset>
					<table width="100%">
						<tr>
							<td align="right"><sj:submit formIds="formSelectOne"
									targets="result" effect="pulsate" value="Save"
									indicator="indicator" button="true" /> <sj:a button="true"
									onclick="onButtonClick()">Back</sj:a></td>

						</tr>
					</table>
					<s:form theme="simple">
						<table>
							<tr>
								<td>Outreach Location</td>
								<td>
									<fieldset style="min-width: 50px;">
										<INPUT NAME="options" TYPE="CHECKBOX" VALUE="01">Option
										1<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="02">Option
										2<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="03">
										Option 3<BR>
									</fieldset>
								</td>
								<td>Local Hotels</td>
								<td><fieldset>
										<INPUT NAME="options" TYPE="CHECKBOX" VALUE="01">Option
										1<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="02">Option
										2<BR> <INPUT NAME="options" TYPE="CHECKBOX" VALUE="03">
										Option 3<BR>
									</fieldset></td>

							</tr>

							<tr>
								<td>Travel Details</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
								<td>Vistor Parking Onsite</td>
								<td><s:checkbox name="3"></s:checkbox></td>
							</tr>
							<tr>
								<td>Travel Nearest-Bus</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
								<td>Visitor Parking Spaces</td>
								<td><s:textfield name="charityNumber" value="0"></s:textfield>
								</td>
							<tr>
								<td>Travel Nearest-Real</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>

							</tr>

							<tr>
								<td>Travel Nearest - Airport</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
								<td>Visitor Parking Altermative</td>
								<td><s:textarea name="shortDescription"></s:textarea>
								</td>
							</tr>

							<tr>
								<td>Host Visits</td>
								<td><s:checkbox name="3"></s:checkbox></td>
							</tr>
							<tr>
								<td>Hosting Contact</td>
								<td><s:textfield name="postCode"></s:textfield> <A
									HREF="lookup"><font color="blue">Lookup</font> </A></td>
							</tr>
						</table>
					</s:form>
				</fieldset>
			</div>


			<div id="tfour">

				<fieldset>
					<table width="100%">
						<tr>
							<td align="right"><sj:submit formIds="formSelectOne"
									targets="result" effect="pulsate" value="Save"
									indicator="indicator" button="true" /> <sj:a button="true"
									onclick="onButtonClick()">Back</sj:a></td>

						</tr>
					</table>
					<s:form theme="simple">
						<table>
							<tr>

								<td>Room Only Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
								<td>Negotiated Room Only Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>

							</tr>

							<tr>
								<td>b&B Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
								<td>B&B Negotiated Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
							</tr>

							<tr>
								<td>DBB Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
								<td>DBB Negotiated Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>

							</tr>

							<tr>
								<td>DBB Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
								<td>DD Negotiated Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
							</tr>
							<tr>
								<td>DD Rate</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
								<td>FLast Negotiated Date</td>
								<td><sj:datepicker name="fundingStart"></sj:datepicker></td>
							</tr>
							<tr>
								<td>Lunch</td>
								<td><s:checkbox name="3">Contact 1</s:checkbox>
								</td>
								<td>Re-negotiate On</td>
								<td><sj:datepicker name="fundingStart"></sj:datepicker></td>
							</tr>
							<tr>
								<td>No of Meeting Rooms</td>
								<td><s:textfield name="charityNumber"></s:textfield></td>
								<td>Preferred Status</td>
								<td><s:select
										list="#{'01':'Czech','02':'French','03':'Viet Nam','04':'America'}"
										name="nation"></s:select>
								</td>

							</tr>

							<tr>
								<td>Meeting Room Rate Per</td>
								<td><s:textfield name="dfdf"></s:textfield>
								<td>Comments</td>
								<td><s:textarea name="shortDescription"></s:textarea>
								</td>
							</tr>

							<tr>
								<td>Codings</td>
								<td><s:select
										list="#{'01':'Czech','02':'French','03':'Viet Nam','04':'America'}"
										name="nation"></s:select>
								</td>
							</tr>
						</table>
					</s:form>
				</fieldset>
			</div>

			<div id="tfive">
				<fieldset>
					<s:form action="premiseListAction" theme="simple">
						<tr>
							<td><a href="<s:url action="servicesAllSearch"/>">All</a></td>
							<td><a href="<s:url action="services09Search"/>">0-9</a></td>
							<td><a href="<s:url action="servicesAESearch"/>">A B C D
									E</a></td>
							<td><a href="<s:url action="servicesFJSearch"/>">F G H I
									J</a></td>
							<td><a href="<s:url action="servicesKNSearch"/>">K L M N</a>
							</td>
							<td><a href="<s:url action="servicesORSearch"/>">O P Q R</a>
							</td>
							<td><a href="<s:url action="servicesSVSearch"/>">S T U V</a>
							</td>
							<td><a href="<s:url action="servicesWZSearch"/>">W X Y Z</a>
							</td>
							<td><s:submit value="Copy" method="copy"></s:submit>
							</td>
							<td><s:submit value="Create" method="create"></s:submit>
							</td>
							<td><s:checkbox name="includeInactive"> Include In-active </s:checkbox>
							</td>
						</tr>
						<br>
						<s:url id="getPremisedetailUrl" action="PremiseListAction" />
						<sjg:grid id="gridtable" caption="Customer Examples"
							dataType="json" href="%{getPremisedetailUrl}" pager="true"
							gridModel="gridModel" rowNum="15" rownumbers="true">
							<sjg:gridColumn name="locationName" index="locationName"
								title="Facility Type" sortable="false" />
							<sjg:gridColumn name="address1" index="address1"
								title="Description" sortable="false" />
							<sjg:gridColumn name="roomhost" index="roomhost"
								title="Room Host" sortable="false" />
							<sjg:gridColumn name="isNewShop" index="isNewShop"
								title="Is Active?" sortable="false" />
						</sjg:grid>
					</s:form>
				</fieldset>
			</div>




			<div id="tseven">
				<fieldset>
					<s:form theme="simple">
						<b>General</b>
						<table>
							<tr>
								<td>P/MW Description<font color="red">*</font></td>
								<td><s:textarea name="shortDescription"></s:textarea>
								</td>
								<td>Contact</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>

							</tr>
							<tr>
								<td></td>
								<td></td>
								<td>Authorised by Name</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
							</tr>

							<tr>
								<td><s:radio list="#{'01':'Project','02':'MinorWork'}"></s:radio>
								</td>
							</tr>

							<tr>
								<td></td>
								<td></td>
								<td>Status</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
							</tr>


							<tr>
								<td>is TBA?</td>
								<td><s:checkbox name="3"></s:checkbox></td>
								<td>P/MW Enquiry Received</td>
								<td><sj:datepicker name="fundingStart"></sj:datepicker>
								</td>
							</tr>



							<tr>
								<td>Notes Actions</td>
								<td><s:textarea name="shortDescription"></s:textarea>
								</td>
								<td>Actual Start Date</td>
								<td><sj:datepicker name="fundingStart"></sj:datepicker>
								</td>
							</tr>



							<tr>
								<td>Estimated Cost</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
								<td>Anticpated Completion</td>
								<td><sj:datepicker name="fundingStart"></sj:datepicker>
								</td>
							</tr>





							<tr>

								<td>Actual Cost</td>
								<td><s:textfield name="charityNumber"></s:textfield>
								</td>
								<td>Actual Completion Date</td>
								<td><sj:datepicker name="fundingStart"></sj:datepicker>
								</td>
							</tr>

							<tr>
								<td>Directorate</td>
								<td><s:select
										list="#{'01':'Czech','02':'French','03':'Viet Nam','04':'America'}"
										name="nation"></s:select></td>

							</tr>



						</table>
					</s:form>
				</fieldset>
			</div>

			<div id="teight">
				<fieldset>
					<s:form theme="simple">
						<s:url id="getPremiseUrl" action="PremiseListAction" />
						<sjg:grid id="gridtablePremise" caption="Premises" dataType="json"
							href="%{getPremiseUrl}" pager="true" gridModel="gridModel"
							rowNum="15" rownumbers="true">
							<sjg:gridColumn name="locationName" index="locationName"
								title="Premise Name" sortable="false" />
							<sjg:gridColumn name="address1" index="address1" title="Address"
								sortable="false" />
							<sjg:gridColumn name="phoneNumber" index="phoneNumber"
								title="Phone Number" sortable="false" />
							<sjg:gridColumn name="locationDescription"
								index="locationDescription" title="Project Code"
								sortable="false" />
							<sjg:gridColumn name="isNewShop" index="isNewShop" title="Remove"
								sortable="false" />
						</sjg:grid>
						<s:submit value="Associate new premise"></s:submit>
					</s:form>
				</fieldset>
			</div>

		</sj:tabbedpanel>


	</fieldset>
</body>
</html>